<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport"
    content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>中将列表</title>
  <!-- 1. 引入react核心库 -->
  <script src="./node_modules/react/umd/react.development.js"></script>
  <!-- 2. 引入react-dom 用于支持react操作dom -->
  <script src="./node_modules/react-dom/umd/react-dom.development.js"></script>
  <div id="root"></div>
  <script>
    // 3. 创建React元素
    /*
    * <div class='item'>
       <h2 class='title'>中奖列表</h2>
       <ul class='list'>
         <li>1. 张三</li>
         <li>2. 张三</li>
         <li>3. 张三</li>
       </ul>
    </div>
    */
    let item = React.createElement('div', { className: "item", title: '列表' },
      React.createElement('h2', { className: "title" }, '中奖列表'),
      React.createElement('ul', { className: 'list' },
        React.createElement('li', null, ('1. 张三')),
        React.createElement('li', { onClick: function () { alert('里斯') } }, ('2. 里斯')),
        React.createElement('li', null, ('2. 张三')),
      ),
    ) 
    // 4.创建根节点
    let root = ReactDOM.createRoot(document.getElementById('root'))
    //5.渲染到页面中
    root.render(item)
  </script>
</head>

<body>

</body>

</html>